package com.example.imtoken.modules.login

import com.example.imtoken.R
import com.example.imtoken.entitys.app.BannerItem
import com.zhpan.bannerview.BaseBannerAdapter
import com.zhpan.bannerview.BaseViewHolder

class LoginBannerAdapter : BaseBannerAdapter<BannerItem>() {

    override fun bindData(
        holder: BaseViewHolder<BannerItem>?,
        data: BannerItem?,
        position: Int,
        pageSize: Int
    ) {
        holder?.setImageResource(R.id.itemIvBanner, data?.imageResId ?: 0)
        holder?.setText(R.id.itemTvTitle, data?.titleResId ?: 0)
    }

    override fun getLayoutId(viewType: Int): Int {
        return R.layout.item_banner
    }
}